package initializer

import (
	"go_ruoyi/global"
	"go_ruoyi/router"

	"github.com/gin-gonic/gin"
)

func Initialization() {
	//初始化viper
	InitViper()

	//初始化mysql
	InitMysql()

	//初始化redis
	InitRedis()

	//初始化路由
	gin.SetMode("release")
	r := gin.Default()
	router.InitRouter(r)
	port := global.Viper.GetString("app.port")
	r.Run(port)
}
